package com.wingy.mybroadcastinxml;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class BroadCastinXMLActivity extends AppCompatActivity {

    private Button button = null;
    private final String nobady = "Who.care.the.name";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_broad_castin_xml);
        button = (Button) findViewById(R.id.myButton);
        button.setOnClickListener(new MyOnClickListener());
    }
    class MyOnClickListener implements OnClickListener {
        @Override
        public void onClick(View v) {
            Intent intent = new Intent(nobady);
            intent.putExtra("testIntent", "111111111111");
            sendBroadcast(intent);
        }
    }

}
